from  selenium.webdriver.common.by import By
from  base.base_page import BasePage

class ToubiPage(BasePage):
    def __init__(self):
        super().__init__()
        # 投币
        self.book_toubi = (By.XPATH,
        "//*[@id='app']/div[1]/header/div[1]/div[5]/div[3]/div/span")
        # 投币次数
        self.toubi_cs = (By.XPATH,
        "//*[@id='app']/div[1]/div[2]/div/div[2]/div/div[1]/div/div/input")
        # 确定投币
        self.toubi_qd = (By.XPATH,
        "//*[@id='app']/div[1]/div[2]/div/div[2]/div/div[2]/button[2]")

    #投币
    def home_to_toubi(self,key):
        self.find_el(self.book_toubi).click()
        self.find_el(self.toubi_cs).clear()
        self.find_el(self.toubi_cs).send_keys(key)
        self.find_el(self.toubi_qd).click()